<?php

namespace Tests\Console;

use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Symfony\Component\Console\Exception\RuntimeException;

class CreatePermissionTest extends TestCase
{
    use WithFaker;

    public function testSuccess()
    {
        $this->artisan('permission:create ' . $this->faker->word())->assertSuccessful();
    }

    public function testFailed()
    {
        $this->expectException(RuntimeException::class);
        $this->artisan('permission:create');
    }
}
